package com.emm.yixun.marketing.service.impl;

import javax.jws.WebService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.emm.yixun.basic.service.CusAppPushService;
import com.emm.yixun.common.model.dto.NoticeEntity;
import com.emm.yixun.common.response.Response;
import com.emm.yixun.marketing.service.CusAppPushServiceFacade;

@Service("cusAppPushServiceFacade")
@WebService(name = "com.emm.yixun.marketing.service.CusAppPushServiceFacade")
public class CusAppPushServiceFacadeImpl implements CusAppPushServiceFacade {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	private CusAppPushService cusAppPushService;

	Response<Boolean> response = new Response<Boolean>();

	/**
	 * 组装消息内容
	 * 
	 * @param noticeType提醒类型（1、认筹）, noticeBusinessId 业务主键Id
	 * @return
	 */
	@Override
	public Response<Boolean> busNotice(NoticeEntity noticeEntity) {
		//消息推送app业务处理
		try {
			cusAppPushService.busNotice(noticeEntity);
			response.setSuccess(true);
			return response;
		} catch (Exception e) {
			e.printStackTrace();
			response.setSuccess(false);
			logger.error("组装app消息内容【面积补差】异常:{}", e);
		}
		return response;
	}
	
}
